<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTestingUserRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('testing_user_record', function (Blueprint $table) {
            $table->increments('id');
            $table->Integer('uid')->default(0)->comment('用户编号');
            $table->Integer('tid')->default(0)->comment('题目编号');
            $table->text('answers')->nullable()->comment('答案的json串');
            $table->double('score')->default(0)->comment('分数');
            $table->string('advince_ids')->nullable()->comment('建议id');
            $table->test('conclusion')->nullable()->comment('测评结论');
            $table->text('final_answers')->nullable()->comment('重新组装后的答案的json串');
            $table->Integer('testtime')->default(100)->comment('测试时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('testing_user_record');
    }
}
